<template>
  <el-container class="layout-container">
    <el-aside width="200px">
      <el-menu
        :default-active="activeMenu"
        class="el-menu-vertical"
        background-color="#304156"
        text-color="#bfcbd9"
        active-text-color="#409EFF"
        router
      >
        <el-menu-item index="/ai-center">
          <el-icon><Monitor /></el-icon>
          <span>AI 中心</span>
        </el-menu-item>
        <el-menu-item index="/ai-center/data-management">
          <el-icon><DataLine /></el-icon>
          <span>数据管理</span>
        </el-menu-item>
        <el-menu-item index="/ai-center/feature-engineering">
          <el-icon><Setting /></el-icon>
          <span>特征工程</span>
        </el-menu-item>
        <el-menu-item index="/ai-center/model-training">
          <el-icon><Cpu /></el-icon>
          <span>模型训练</span>
        </el-menu-item>
        <el-menu-item index="/ai-center/model-evaluation">
          <el-icon><TrendCharts /></el-icon>
          <span>模型评估</span>
        </el-menu-item>
        <el-menu-item index="/ai-center/model-monitoring">
          <el-icon><Monitor /></el-icon>
          <span>模型监控</span>
        </el-menu-item>
      </el-menu>
    </el-aside>
    
    <el-container>
      <el-header>
        <div class="header-title">IoT 监控系统 - AI 中心</div>
      </el-header>
      
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import { Monitor, DataLine, Setting, Cpu, TrendCharts } from '@element-plus/icons-vue'

const route = useRoute()
const activeMenu = computed(() => route.path)
</script>

<style scoped>
.layout-container {
  height: 100vh;
}

.el-aside {
  background-color: #304156;
}

.el-menu-vertical {
  border-right: none;
}

.el-header {
  background-color: #fff;
  border-bottom: 1px solid #e6e6e6;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.header-title {
  font-size: 18px;
  font-weight: bold;
}

.el-main {
  background-color: #f0f2f5;
  padding: 20px;
}
</style> 